import {createRouter, createWebHashHistory} from 'vue-router'
import i18n from "@/locale/index";
import transitionExtend from "@/utils/transition-extend";

const {tm} = i18n.global
const routes = [
    {
        path: '/',
        redirect: '/hScmlvxSUkDQ/UjRzDSClllpS'
    },
    {
        path: '/JFLAWJLfjkw',
        component: () => import('@/components/Login'),
    },
    // 个人信息
    {
        path: '/rORwiYkPMKBS',
        meta: {
            keepAlive: true,
            title: tm('personal_info')
        },
        component: () => import('@/views/personalInfo/index'),
    },
    // 工作信息
    {
        path: '/CkYcQRegPw',
        meta: {
            keepAlive: true,
            title: tm('work_info')
        },
        component: () => import('@/views/workInfo/index'),
    },
    //联系人信息
    {
        path: '/LSgdIjyrOR',
        meta: {
            keepAlive: true,
            title: tm('contact_info')
        },
        component: () => import('@/views/contactsInfo/index'),
    },
    //信用记录
    {
        path: '/deySOVCMPA',
        meta: {
            keepAlive: true,
            title: tm('historial_de_creditos')
        },
        component: () => import('@/views/creditInfo/index'),
    },
    //添加银行卡信息
    {
        path: '/nilVFYlKmK',
        meta: {
            keepAlive: true,
            title: tm('add_bank_card')
        },
        component: () => import('@/views/bankCardInfo/index'),
    },
    //贷款信息
    {
        path: '/kxrCNoNoUZ',
        meta: {
            keepAlive: true,
            title: tm('loan_info_confirmation')
        },
        component: () => import('@/views/loanInfo/index'),
    },
    // 贷款成功
    {
        path: '/oBVrmEUinQ',
        meta: {
            keepAlive: true,
            title: tm('submit_success')
        },
        component: () => import('@/views/loanSuccess/index'),
    },
    // 首页
    {
        path: '/hScmlvxSUkDQ',
        meta: {
            keepAlive: true
        },
        component: () => import('@/layout/index'),
        children: [
            {
                path: 'UjRzDSClllpS',
                meta: {
                    keepAlive: true
                },
                component: () => import('@/views/home/index'),
            }
        ]
    },
    // 订单
    {
        path: '/DIjlFtCOoeJh',
        component: () => import('@/layout/index'),
        children: [
            {
                path: 'gCyKuncAiMJg',
                meta: {
                    keepAlive: true
                },
                component: () => import('@/views/order/index'),
            },
        ]
    },


    {
        //订单详情
        path: '/ERlAaAFWeQ',
        meta: {
            keepAlive: true,
            title: tm('order_details')
        },
        component: () => import('@/views/order/orderDetails/index'),
    },
    {
        //支付确认
        path: '/JkGQsgTJyZ',
        meta: {
            keepAlive: true,
            title: tm('repayment_details')
        },
        component: () => import('@/views/order/repayment/index'),
    },
    {
        //展期
        path: '/AAHdUmpZXl',
        meta: {
            keepAlive: true,
            title: tm('delay')
        },
        component: () => import('@/views/order/extend/index'),
    },
    // 我的
    {
        path: '/tNFfkxWIpbRd',
        component: () => import('@/layout/index'),
        children: [
            {
                path: 'PmsdBJdPYkgT',
                component: () => import('@/views/my/index'),
            },

        ]
    },

    {
        //问题反馈
        path: '/zMsSEHQAzer',
        meta: {
            keepAlive: true,
            title: tm('problem_feedback')
        },
        component: () => import('@/views/my/set/feedBack/index'),
    },
    {
        //  关于我们
        path: '/rKUgDjpinxU',
        meta: {
            keepAlive: true,
            title: tm('about_us')
        },
        component: () => import('@/views/my/set/aboutUs/index'),
    },
    {
        //   历史订单
        path: '/zlgnDYovQNn',
        meta:{
            keepAlive: true,
        },
        component: () => import('@/views/order/orderHistory/index'),
    },
    {
        //  sky还款
        path: '/TGxcJYBvaFO',
        meta:{
            keepAlive: true,
        },
            component: () => import('@/views/order/skyRepayment/index'),
    },
    {
        //  sky二维码还款
        path: '/EJqsxkAFndw',
        meta:{
            keepAlive: true,
        },
        component: () => import('@/views/order/qrCodeRepayment/index'),
    },

    {
        //  我的银行卡列表
        path: '/ZMyMfdSBUti',
        meta:{
            keepAlive: true,
        },
        component: () => import('@/views/bankCardInfo/myCard/index'),
    },
    {
        //  历史订单详情
        path: '/tSjFyfeSgda',
        meta:{
            keepAlive: true,
        },
        component: () => import('@/views/order/orderHistoryDetails/index'),
    },
    {
        //  账号注销
        path: '/QoEpUoutegv',
        component: () => import('@/views/my/accountCancel/index'),
    },
    {
        //  确认借款
        path: '/qdFaOEpQOpE',
        component: () => import('@/views/confirmLoan/index'),
    },
    {
        //  添加银行卡
        path: '/SeyVWhOfsfl',
        component: () => import('@/views/bankCardInfo/addCard/index'),
    },
]
const routerHistory = createWebHashHistory()

let router = createRouter({
    scrollBehavior() {
        // 始终滚动到顶部
        return {top: 0}
    },
    history: routerHistory,
    routes: routes
})
router = transitionExtend(router)
export default router
